@charset "UTF-8";
.search {
  width: 80%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
  transition: transform 0.3s ease;
}

.search .search-wrapper {
  position: relative;
  display: inline-block;
}

.search .search.fixed {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 80%;
  max-width: 800px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search .input-focused .ant-input-prefix {
  transform: translateX(80px);
  /* 向右移动的距离 */
}

.search .input-focused .ant-input::placeholder {
  padding-left: 80px;
  /* 向右移动placeholder */
}

.search .dropdown-panel {
  position: absolute;
  border-right: 1px solid #ccc;
  height: 4px;
  margin-top: 8px;
  padding: 8px 0;
  z-index: 10000;
}

.search .dropdown-panel.left {
  top: 8px;
  left: 0px;
  margin-top: 0;
}

.search .content-box {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  margin-top: 8px;
  padding: 16px;
}

.search .content-box.bottom {
  top: calc(100% + 8px);
}

.search .dropdown-item, .search .content-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search .dropdown-item:hover, .search .content-item:hover {
  background-color: #f5f5f5;
}

.search.fixed {
  position: fixed;
  top: 0;
  left: 60%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 100%;
  padding: 10px 20px;
}

.search.fixed .search-wrapper {
  position: static;
}

.search.fixed .dropdown-panel.left {
  left: -260px;
}

.search.fixed .content-box.bottom {
  left: 50%;
  transform: translateX(-50%);
  width: 650px;
}

.search.fixed .ant-input-affix-wrapper {
  width: 650px !important;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .search.fixed {
    padding: 10px;
  }
  .search.fixed .ant-input-affix-wrapper {
    width: 90% !important;
  }
}
